package com.gtw.modules.api.controller;

import com.gtw.common.annotation.AuthIgnoreApi;
import com.gtw.common.utils.PageUtils;
import com.gtw.common.utils.Query;
import com.gtw.common.utils.R;
import com.gtw.modules.entity.EwmBgEntity;
import com.gtw.modules.sys.service.EwmBgService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


/**
 * 
 * 
 * @author wuye
 * @email www.baidu.com
 * @date 2018-07-27 14:19:18
 */
@RestController
@RequestMapping("api/ewmbg")
public class ApiEwmBgController {
	@Autowired
	private EwmBgService ewmBgService;

	/**
	 * 列表
	 */
	@RequestMapping(method = RequestMethod.GET)
	@AuthIgnoreApi
	public R list(@RequestParam Map<String, Object> params){
		//查询列表数据
        Query query = new Query(params);

		List<EwmBgEntity> ewmBgList = ewmBgService.queryList(query);

		return R.ok().put("data", ewmBgList.get(0).getImg());
	}
	

	

	
}
